package OOP;

public class Test_DG {
    public int fbnq(int nums){
        if(nums==0||nums==1){
            return nums;
        }

        return fbnq(nums-1)+fbnq(nums-2);
    }

    public int jc(int nums){
        int res = 1;
        for (int i = 1; i <= nums; i++) {
            res = res * i;
        }
        return res;
    }
    public int jc2(int nums){
        if(nums==1){
            return 1;
        }
        return nums*jc2(nums-1);
    }



    public static void main(String[] args) {
        Test_DG test_dg = new Test_DG();

        System.out.println(test_dg.fbnq(10));
        System.out.println(test_dg.jc(4));
        System.out.println(test_dg.jc2(5));
    }
}
